package com.leo.train.business.controller.web;

import com.leo.train.business.entity.Station;
import com.leo.train.business.service.StationService;
import com.leo.train.common.resp.CommonResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/station")
public class StationController {
    @Autowired
    private StationService stationService;

    /**
     * 车站所有列表
     */
    @GetMapping("/listAll")
    public CommonResp<List<Station>> listAll() {
        List<Station> list = stationService.listAll();
        return new CommonResp<>(list);
    }


}
